package com.ruicar.afs.cloud.basic.feign;

import com.ruicar.afs.cloud.common.core.feign.annotations.AfsFeignClear;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.common.modules.apply.dto.ApplyIdCardDTO;
import com.ruicar.afs.cloud.common.modules.apply.dto.ApplyIdCardInfoDTO;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @author: Lee
 * @date: 2020/5/11 19:39
 * @description: 这个feign是进件的feign，因为apply工程创建初始的时候不规范，没有创建api模块，所以apply模块的feign没地方写
 */
@ConditionalOnProperty(name = "com.greatwall.services.apply-service.url")
@FeignClient(name = "contract-basic-common", url = "${com.greatwall.services.apply-service.url}")
public interface ApplyFeign {

    @PostMapping(value = "/contract/getIdCardInfo")
    @AfsFeignClear(true)
    public IResponse<ApplyIdCardInfoDTO> getIdCardInfo(@RequestBody ApplyIdCardDTO dto, @RequestHeader Map<String, String> headers);
}
